package com.hub.realtime.resource.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hub.realtime.common.annotation.Excel;
import com.hub.realtime.common.core.domain.BaseEntity;

/**
 * 集群管理表对象 res_cluster
 *
 * @author wupeng
 * @date 2021-12-31
 */
@Data
@TableName("res_cluster")
public class ResCluster extends BaseEntity<ResCluster>
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value="id", type= IdType.AUTO)
    private Long id;

    /** 集群名称 */
    @TableField("cluster_name")
    @Excel(name = "集群名称")
    private String clusterName;

    /** 集群类型(yarn|k8s) */
    @TableField("cluster_type")
    @Excel(name = "集群类型(yarn|k8s)")
    private String clusterType;

    /** 是否启用 */
    @TableField("is_enable")
    @Excel(name = "是否启用")
    private String isEnable;

    /** hadoop配置文件存放路径 */
    @TableField("hadoop_dir")
    @Excel(name = "hadoop配置文件存放路径")
    private String hadoopDir;

    /** 是否开启kerberos */
    @TableField("is_kereros")
    @Excel(name = "是否开启kerberos")
    private String isKereros;

    /** kereros配置路径 */
    @TableField("kereros_dir")
    @Excel(name = "kereros配置路径")
    private String kererosDir;

    /** 是否在使用 */
    @TableField("is_in_use")
    @Excel(name = "是否在使用")
    private String isInUse;

    @TableField("user_id")
    private Long userId;

    /** 如 果yarn网络隔离，需要替换域名地址 */
    @TableField("map_url")
    private String mapUrl;

    @TableField("flink_version")
    private String flinkVersion;

    @TableField("create_success")
    private Boolean createSuccess;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("clusterName", getClusterName())
                .append("clusterType", getClusterType())
                .append("isEnable", getIsEnable())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("hadoopDir", getHadoopDir())
                .append("isKereros", getIsKereros())
                .append("kererosDir", getKererosDir())
                .append("isInUse", getIsInUse())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
